<style type="text/css">
<!--
table.history{
	border-collapse: collapse;
	border: 1px solid #ccc;
	width: 950px;
	margin-bottom: 20px;
}
table.history th, table.history td{
	padding: 5px 10px;
}
table th.action{
	width: 100px;
}
table.history th{
	
	background: #efefef;
}
table.history th.date{
	width:110px;
}
table.history th.status{
	width:150px;
}
div.job-list-apply{
	min-height: 100px;
}
input.date-picker{
	width: 100px;	
}
select#apply-company-id{
	width: 170px;
}
input#apply-search-key{
	width: 170px;
}
table.history  tr.-applied{
	background: #E0E0F8;
}
table.history  tr:hover,
table.history  tr.-applied:hover{
	background: #cfc;
}
-->
</style>
<div class="apply-select">
	<h1>Lựa chọn công việc sẽ ứng tuyển</h1>
	<input type="hidden" id="apply-id" value="<?php echo $data['id']?>"/>
	<label>Công ty </label><select name="filter_company_id" id="apply-company-id" class="update-job">
		<option value="-1"><?php echo __('option_all', null, 'table_list')?></option>
		<?php foreach ($data['companies'] as $com):?>
		<option value="<?php echo $com['id']?>"><?php echo $com['company_name']?></option>
		<?php endforeach;?>
	</select>&nbsp;&nbsp;
	<label>Tìm kiếm</label>
	<input name="filter_key" id="apply-search-key" placeholder="tìm kiếm" value="" class="update-job"/>
	&nbsp;&nbsp;
	<label>Ngày bắt đầu tuyển dụng</label>
	<input type="text" name="apply_date_from" id="apply-date-from" class="date-picker update-job"/>
	&nbsp;&nbsp;
	<label>Ngày kết thúc</label>
	<input type="text" name="apply_date_to" id="apply-date-to" class="date-picker update-job"/>
		<div class="job-list-apply">
		<table border="1" cellpadding="5" class="history" id="apply-job-list">
			<tr>
				<th class="job-name">Công việc</th>	
				<th class="action">Ứng tuyển</th>
				<th class="action">Ghi chú</th>
			<tr>
	</table>
	</div>
</div>
<h1>Lịch sử ứng tuyển</h1>
<div class="history">
	<table border="1" cellpadding="5" class="history">
		<tr>
			<th class="date">Ngày ứng tuyển</th>
			<th class="date">Ngày phỏng vấn</th>
			<th class="job">Công việc</th>
			<th class="status">Kết quả</th>
			<th class="action">Thao tác</th>
		<tr>
		<?php foreach ($data['history'] as $h):?>
		<tr>
			<td><?php echo DateHelper::dateFormat($h['date_apply'])?></td>
			<td><?php echo DateHelper::dateFormat($h['date_interview'])?></td>
			<td><?php echo $h['Jobs']['Companies']['company_name'], ' - ', $h['Jobs']['title']?></td>
			<td><?php echo __('result_status_'.str_replace('-','_',$h['result_status']), null, 'array_data')?></td>
			<td>
				<a href="#" class="apply-edit" data-title="Ứng tuyển" data-candidate-id="<?php echo $data['id']?>" data-job-id="<?php echo $h['Jobs']['id']?>" title="<?php echo __('interview_edit', null, 'candidate_candidates')?>"><img src="/css/admin/img/global/edit.png" /></a>  
				<!-- <a href="#" class="apply-delete" data-confirm="<?php echo __('apply_delete_confirm', null, 'candidate_candidates')?>" data-id="<?php echo $data['id']?>" title="<?php echo __('interview_delete', null, 'candidate_candidates')?>"><img src="/css/admin/img/global/control-delete.png" /></a>
				--></td>
		</tr>
		<?php endforeach;?>
	</table>
</div>
					